﻿@model Presentation.Web.Client.Areas.PartnersManagement.Models.PartnerDetails.PartnerDetailsViewModel
@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script type="text/javascript">
    $(document).ready(function () {
        $("#tabsContainer").tabs().buttonset();
    });    
</script>
<!-- Control Panel -->
<div id="controlPanel">
    @Html.Partial("ControlPanel", Model.ControlPanelActions)
</div>
<div id="separateBorder">
</div>
<!-- Main content -->
<div id="mainContent">
    <h2>
        Partner (Creation)
    </h2>
    <div id="formBlock">
        @using (Html.BeginForm("Edit", "Partners", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            //@Html.Serialize("partner", Model.CurrentPartner)
            <table class="formTable">
                <tr>
                    <td style="width: 40px">
                        @Html.LabelFor(model => model.CurrentPartner.Name)
                    </td>
                    <td>
                        @Html.TextBoxFor(model => model.CurrentPartner.Name)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.CurrentPartner.Code)
                    </td>
                    <td>
                        @Html.TextBoxFor(model => model.CurrentPartner.Code)
                    </td>
                </tr>
            </table>
            <h2>
                _</h2>
            <div id="tabsContainer">
                <ul>
                    <li>
                        <input id="generalTab" type="radio" onclick="this.form.submit()" name="tabName" value="General" />
                        <label for="generalTab">General</label>
                    </li>
                    <li>
                        <input id="addressesTab" type="radio" onclick="this.form.submit()" name="tabName"value="Addresses" />
                        <label for="addressesTab">Addresses</label>
                    </li>
                    <li>
                        <input id="contactsTab" type="radio" onclick="this.form.submit()" name="tabName"value="Contacts" />
                        <label for="contactsTab">Contacts</label>
                    </li>
                    <li>
                        <input id="bankAccountsTab" type="radio" onclick="this.form.submit()" name="tabName" value="Bank accounts" />
                        <label for="bankAccountsTab">Bank accounts</label>
                    </li>
                    <li>
                        <input id="contractsTab" type="radio" onclick="this.form.submit()" name="tabName" value="Contracts" />
                        <label for="contractsTab">Contracts</label>
                    </li>
                    <li>
                        <input id="historyTab" type="radio" onclick="this.form.submit()" name="tabName" value="History" />
                        <label for="historyTab">History</label>
                    </li>
                    <li>
                        <input id="contactPersonsTab" type="radio" onclick="this.form.submit()" name="tabName" value="Contact persons" />
                        <label for="contactPersonsTab">Contact persons</label>
                    </li>
                </ul>
                <div id="tabContent">
                    @{Html.RenderPartial(Model.CurrentTabFileName, Model.CurrentTabViewModel);}
                </div>
            </div>
        }
    </div>
</div>
